Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Class.class as an accept data type in TypedOption #65

Merged
merged 3 commits into from
Mar 7, 2021

Conversation

Linary
Copy link
Contributor

@Linary Linary commented Mar 3, 2021

No description provided.

@codecov
Copy link

codecov bot commented Mar 3, 2021

Codecov Report

Merging #65 (6f8cf74) into master (ccc4d3b) will increase coverage by 0.02%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master      #65      +/-   ##
============================================
+ Coverage     84.80%   84.83%   +0.02%     
- Complexity      767      768       +1     
============================================
  Files            60       60              
  Lines          2205     2209       +4     
  Branches        324      325       +1     
============================================
+ Hits           1870     1874       +4     
  Misses          191      191              
  Partials        144      144              
Impacted Files Coverage Δ Complexity Δ
...m/baidu/hugegraph/config/ConfigListConvOption.java 89.47% <ø> (ø) 7.00 <0.00> (ø)
...a/com/baidu/hugegraph/config/ConfigListOption.java 72.72% <ø> (ø) 6.00 <0.00> (ø)
...ava/com/baidu/hugegraph/version/CommonVersion.java 50.00% <ø> (ø) 1.00 <0.00> (ø)
...in/java/com/baidu/hugegraph/config/HugeConfig.java 83.07% <100.00%> (ø) 18.00 <0.00> (ø)
...n/java/com/baidu/hugegraph/config/TypedOption.java 86.44% <100.00%> (+0.98%) 20.00 <0.00> (+1.00)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ccc4d3b...6f8cf74. Read the comment docs.

return Class.forName(value);
} catch (ClassNotFoundException e) {
throw new RuntimeException(String.format(
"Failed to convert String to Class '%s'", value), e);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Failed to parse Class from String '%s'"

@javeme
Copy link
Contributor

javeme commented Mar 3, 2021

ci error:

Tests run: 291, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 25.855 sec <<< FAILURE!
testCleanExecutor(com.baidu.hugegraph.unit.rest.RestClientTest)  Time elapsed: 0.506 sec  <<< FAILURE!
org.mockito.exceptions.verification.NeverWantedButInvoked: 
poolingHttpClientConnectionManager.closeExpiredConnections();
Never wanted here:
-> at com.baidu.hugegraph.unit.rest.RestClientTest.testCleanExecutor(RestClientTest.java:186)
But invoked here:
-> at com.baidu.hugegraph.rest.AbstractRestClient.lambda$new$0(AbstractRestClient.java:154)
	at com.baidu.hugegraph.unit.rest.RestClientTest.testCleanExecutor(RestClientTest.java:186)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
	at org.junit.runners.Suite.runChild(Suite.java:128)
	at org.junit.runners.Suite.runChild(Suite.java:27)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
	at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252)
	at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141)
	at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
	at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
	at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)
	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)
Results :
Failed tests:   testCleanExecutor(com.baidu.hugegraph.unit.rest.RestClientTest): (..)
Tests run: 291, Failures: 1, Errors: 0, Skipped: 0

zhoney
zhoney previously approved these changes Mar 4, 2021
javeme
javeme previously approved these changes Mar 4, 2021
@Linary Linary dismissed stale reviews from javeme and zhoney via 6f8cf74 March 5, 2021 03:42
@houzhizhen houzhizhen merged commit 42e5260 into master Mar 7, 2021
@javeme javeme deleted the accept-class-type branch March 7, 2021 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants